home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(_X <= 0)
- {
- _X = 10;
- }
- else if(_X >= 590)
- {
- _X = 580;
- }
- if(_root.amitavaplay == true)
- {
- if(Key.isDown(38) && waking == 1 && _Y > 50)
- {
- if(cach == 1)
- {
- rot += 1;
- this._rotation = 0;
- if(rot >= 5)
- {
- _Y = _Y - 70;
- this.gotoAndStop(2);
- waking = 0;
- }
- mov = 2;
- }
- }
- else if(Key.isDown(40) && waking == 1 && _Y < 500)
- {
- if(cach == 1)
- {
- rot += 1;
- this._rotation = 180;
- if(rot >= 5)
- {
- _Y = _Y + 70;
- this.gotoAndStop(2);
- waking = 0;
- }
- mov = -2;
- }
- }
- else if(Key.isDown(39) && waking == 1 && _X < 580)
- {
- if(cach == 1)
- {
- rot += 1;
- this._rotation = 90;
- if(rot >= 5)
- {
- _X = _X + 70;
- this.gotoAndStop(2);
- waking = 0;
- }
- movx = -2;
- }
- }
- else if(Key.isDown(37) && waking == 1 && _X > 50)
- {
- if(cach == 1)
- {
- rot += 1;
- this._rotation = -90;
- if(rot >= 5)
- {
- _X = _X - 70;
- this.gotoAndStop(3);
- waking = 0;
- }
- movx = 2;
- }
- }
- if(this.hitTest(_root.banana))
- {
- if(cach == 1)
- {
- if(food <= 12)
- {
- food += 1;
- _root.banana._visible = false;
- this.gotoAndStop(4);
- cach = 0;
- }
- if(food == 12)
- {
- if(lev == 1)
- {
- if(_root.amitavalife > 0)
- {
- _root.wel.gotoAndPlay(2);
- lev = 0;
- }
- }
- }
- }
- }
- if(this.body.hitTest(_root.b1.br))
- {
- _X = _X - 3;
- Jump = false;
- }
- else if(this.body.hitTest(_root.b2.br))
- {
- _X = _X - 3;
- Jump = false;
- }
- else if(this.body.hitTest(_root.b3.br))
- {
- _X = _X - 3;
- Jump = false;
- }
- else if(this.body.hitTest(_root.b4.br))
- {
- Jump = false;
- }
- else if(this.body.hitTest(_root.b5.br))
- {
- _X = _X - 3;
- Jump = false;
- }
- else if(this.hitTest(_root.b6.br))
- {
- _X = _X - 3;
- Jump = false;
- }
- else if(this.hitTest(_root.b7.br))
- {
- _X = _X - 3;
- Jump = false;
- }
- else if(this.hitTest(_root.b8.br))
- {
- _X = _X + 3;
- Jump = false;
- }
- else if(this.hitTest(_root.b9.br))
- {
- _X = _X + 3;
- Jump = false;
- }
- else if(this.hitTest(_root.b10.br))
- {
- _X = _X + 3;
- Jump = false;
- }
- else if(this.hitTest(_root.b11.br))
- {
- _X = _X + 3;
- Jump = false;
- }
- else if(this.hitTest(_root.b12.br))
- {
- _X = _X + 3;
- Jump = false;
- }
- else
- {
- Jump = true;
- }
- if(this.body.hitTest(_root.wat1) && Jump == true)
- {
- if(ml == 1)
- {
- _root.monkey.gotoAndStop(5);
- _root.monkey.waking = 0;
- ml = 0;
- }
- }
- if(this.body.hitTest(_root.wat2) && Jump == true)
- {
- if(ml == 1)
- {
- _root.monkey.gotoAndStop(5);
- _root.monkey.waking = 0;
- ml = 0;
- }
- }
- if(this.body.hitTest(_root.wat3) && Jump == true)
- {
- if(ml == 1)
- {
- _root.monkey.gotoAndStop(5);
- _root.monkey.waking = 0;
- ml = 0;
- }
- }
- }
- }
-